

export function detailsWeb(name: string, position: string) {
    // https://www.op.gg/champion/tahmkench/statistics/top/build
    return `https://www.op.gg/champion/${name}/statistics/${position}/build`
}

export function tierFormat(data: string) {
    //opgg-static.akamaized.net/images/site/champion/icon-champtier-1.png
    return data.replace('//opgg-static.akamaized.net/images/site/champion/icon-champtier-', '').split('.')[0]
}

export function nameFormat(data: string) {
    return data.replace(/[\W]/g, '')
}


export function imgFormat(data: string) {
    // //opgg-static.akamaized.net/images/lol/spell/SummonerFlash.png?image=c_scale,q_auto,w_40&v=1637122822
    return data.replace('https://opgg-static.akamaized.net/images/lol/spell/', '').split('.')[0]
}

export function heroImgFormat(data: string) {
    // //opgg-static.akamaized.net/images/lol/champion/TahmKench.png?image=c_scale,q_auto,w_80&amp;v=1637122822
    return data.replace('https://opgg-static.akamaized.net/images/lol/champion/', "").split('.')[0]
}